<template>
  <!-- 订单管理 -->
  <div id="Order" class="Order">
    <h1>订单管理</h1>

    <el-table :data="orderlist" border style="width: 100%">
      <el-table-column prop="orderNo" label="订单号" width="180"></el-table-column>
      <el-table-column prop="receiverName" label="收件人" width="180"></el-table-column>
      <el-table-column prop="statusDesc" label="订单状态" width="180"></el-table-column>
      <el-table-column prop="payment" label="订单总价" width="180"></el-table-column>
      <el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>
      <el-table-column label="操作">
        <span class="gai">修改名称</span>
        <span class="gai">查看子类品类</span>
      </el-table-column>
    </el-table>
    <paging :total="total" @sorter="handleCurrentChange"></paging>
  </div>
</template>

<script>
import { Order } from "@/request/http";
import { Orderpage } from "@/request/http";
import paging from "@/pages/home/components/paging";

export default {
  props: {},
  name: "Order",
  data() {
    return {
      orderlist: [],
      total: 5,
    };
  },
  created() {},
  computed: {},
  components: {
    paging,
  },
  methods: {
    handleCurrentChange(val) {
      Orderpage(val).then((data) => {
        // console.log(data.data);
        this.orderlist = data.data.data.list;
        // console.log(this.orderlist);
      });
    },
    onSubmit() {
      Shopsearch.then((data) => {
        console.log(data);
      });
    },
  },
  mounted() {
    // 页面进入时加载内容
    Order.then((data) => {
      if (data.data.status == 0) {
        // console.log(data);
        this.orderlist = data.data.data.list;
        this.total = data.data.data.total;
        // console.log(this.total)
        // console.log(this.orderlist);
      }
    });
  },
  watch: {},
};
</script>
<style scoped lang="scss">
.Order {
  .gai {
    color: rgb(144, 192, 219);
    margin-left: 10px;
  }
}
h1 {
  font-size: 60px;
  padding: 40px;
  display: flex;
}
</style>